﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;

namespace project_assess
{
    public enum icon_img
    {
        alert1, alert2, error, query, ok, warning, info
    }
    public partial class message_frm : Office2007Form
    {
       public  bool yesorno;
       System.Resources.ResourceManager resources = new System.Resources.ResourceManager("project_assess.pic", System.Reflection.Assembly.GetExecutingAssembly());


        public message_frm(string msg, string title, icon_img icon)
        {
            InitializeComponent();
            labelX1.Text = msg;
            this.Text = title;
            if (icon == icon_img.alert1)
            {
                buttonX1.Visible = false;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Alert1")));  
            }
            else if (icon == icon_img.alert2)
            {
                buttonX1.Visible = false;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Alert2"))); 
            }
            else if (icon == icon_img.error)
            {
                buttonX1.Visible = false;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Error"))); 
            }
            else if (icon == icon_img.ok)
            {
                buttonX1.Visible = false;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Ok"))); 
            }
            else if (icon == icon_img.query)
            {
                buttonX1.Visible = true;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Query")));  
            }
            else if (icon == icon_img.info)
            {
                buttonX1.Visible = false;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Info")));
            }
            else if (icon == icon_img.warning)
            {
                buttonX1.Visible = false;
                pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("Warning")));
            }

        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            yesorno = true;
            this.Hide();
        }

        private void buttonX1_Click_1(object sender, EventArgs e)
        {
            yesorno = false;
            this.Hide();
        }
    }
}
